package com.ctrip.demo.java8;

import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ConCurrentHashMapTest {

    public static void main(String[] args) {
        Map<String , String> map = new ConcurrentHashMap<>();

        map.put("name", "name");
        String changeName = map.get("name");
         changeName = map.computeIfAbsent(changeName, name -> {
            return map.get(name).toLowerCase(Locale.ROOT);
        });

        System.out.println(changeName);
    }
}
